In a semiconductor device that transmits a signal via light transmission and light reception, it is important to prevent malfunction in a receiving circuit. For example, in a photo-coupler, a light receiving element receives the light signal and outputs a light current. In the receiving circuit, the light current is converted into a signal voltage and comparing the signal voltage with a threshold voltage generates an output signal. Then, an offset is set for the threshold voltage in order to prevent malfunction during a time period without the light signal.
However, when the light current rises relatively gently, a time period where the signal voltage is close to the threshold voltage is longer than a switching time. Then, variations in the signal voltage often induce chattering in the output signal, resulting in a malfunction.